package cn.zcf.pet.controller;

import cn.zcf.pet.domain.PetType;
import cn.zcf.pet.service.IPetTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/petType")
public class PetTypeController {
    @Autowired
    private IPetTypeService service;
    @GetMapping("/typeTree")
    public List<PetType> petTree(){
        return service.petTree();
    }
}
